﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />


<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>

  <div class="container-fluid ihg-container">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">我的辅导活动</li>
      </ol>
      <div class="pull-right">
        <a href="${ctx.host}/coach-coaching-progress" style="color: #155CB2;font-size: 16px;"><<&nbsp;返回学员列表</a>
      </div>
    </div>
    
    <div class="row">
      <div class="clearfix">
        <div class="col-xs-8">
          <div style="width: 100%; margin-left: 10px;">
            <p style="font-weight: bold; color: #666; font-size: 20px;">说明</p>
            <ul class="list-unstyled instruction-list">
              <li>感谢您担任${delegate.name}的教练！您将负责与学员开展持续的职业发展辅导，助力学员快速发展至下一个职业目标。您可以在右侧点击下载《教练指南》了解更多关于本次项目以及您的角色的相关信息</li>
              <li>学员${delegate.name}已经完成智选假日总经理职业洞察力项目的测评阶段，您可以在右侧点击下载TA的《职业洞察力报告》，查阅来自发展中心观察员对TA的行为观察结果和发展建议</li>
              <li>根据发展中心的评估结果和建议，学员${delegate.name}将在6-12个月内制定并执行《个人发展计划》，您可以在右侧点击下载</li>
              <li>作为${delegate.name}的教练（Coach），在这一过程中，您将与学员开展至少六次辅导谈话。我们鼓励学员主动与您约定辅导谈话的时间</li>
              <li>在每次辅导谈话后的两周内，学员将会在系统中提交一份谈话总结并根据需要更新个人发展计划。谈话总结提交后，您将会收到一封提醒邮件，要求您查阅并在系统中确认TA的谈话总结</li>
              <li>如果您认可学员在发展过程中的努力以及谈话总结的质量，可以点击“确认” ，完成该次辅导谈话记录；否则，您可以点击“退回”，要求学员重新修订。学员必须在系统中完成六次辅导谈话记录，才能从本次发展中心结业</li>
              <li>再次感谢您的工作！</li>
            </ul>
          </div>
        </div>
        <div class="col-xs-4">
          <c:choose>
            <c:when test="${empty delegateAttributes or empty delegateAttributes['coaching-plan']}">
              <div class="pull-left" style="width: 170px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="javascript:void(0);" class="certification-item color-danger" data-target="#upload" data-toggle="modal" style="width: 170px; height: 170px; line-height: 1.2; font-size: 15px; background-color: #dea948;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">学员的发展<br>计划</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">未上传</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:when>
            <c:otherwise>
              <div class="pull-left" style="width: 170px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="${delegateAttributes['coaching-plan'].value}" class="certification-item" style="width: 170px; height: 170px; line-height: 1.2; font-size: 15px;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">学员的发展<br>计划</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">点击下载</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:otherwise>
          </c:choose>
          <c:choose>
            <c:when test="${empty sessionReport or empty sessionReport.managerFinalReport}">
              <div class="pull-left" style="width: 170px;margin-left:10px; margin-right:10px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="javascript:void(0);" class="certification-item color-danger" data-target="#upload" data-toggle="modal" style="width: 170px; height: 170px; line-height: 1.2; font-size: 15px; background-color: #dea948;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">学员的职业洞察力<br>报告</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">未上传</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:when>
            <c:otherwise>
              <div class="pull-left" style="width: 170px;margin-left:10px; margin-right:10px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="${sessionReport.managerFinalReport}" class="certification-item" style="width: 170px; height: 170px; line-height: 1.2; font-size: 15px; "> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">学员的职业洞察力<br>报告</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">点击下载</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:otherwise>
          </c:choose>
          
          <div class="pull-left" style="width: 170px;">
            <div class="certification-layout clearfix" style="margin-top: 12px;">
              <div class="item-wrap">
                <a href="${ctx.resource}/template/coach-direction.pdf" class="certification-item" style="width: 170px; height: 170px; line-height: 1.2; font-size: 15px; "> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                  <p class="no-margin"><br>教练指南</p>
                  <button type="button" class="btn certification-btn" style="margin-top: 10px;">点击下载</button>
                </a>
              </div>
            </div>
          </div>
          
        </div>
      </div>
      
      <div class="col-xs-12">
        <div class="ihg-content-layout">
          <table class="table table-striped ihg-table tab-pane development-journey-table" style="margin-top: 15px;">
            <thead>
              <tr>
                <th>辅导谈话</th>
                <th>谈话时间</th>
                <th>最近操作</th>
                <th>状态</th>
                <th>心得总结</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <c:forEach var="conversation" items="${conversations}" varStatus="status">
                <tr>
                  <td>${status.index<10 ? '0' : ''}${status.index+1}</td>
                  <td><fmt:formatDate value="${conversation.conversationDate}" pattern="yyyy/MM/dd"/></td>
                  <td><fmt:formatDate value="${conversation.lastUpdateTime}" pattern="yyyy/MM/dd HH:mm"/></td>
                  <td>
                    <label class="label label-${conversation.status.notSubmited ? 'default' : conversation.status.confirmed ? 'success' : 'danger'}" style="display: block; margin: 0 auto; width: 170px;">${conversation.status.description}"</label>
                  </td>
                  <td><a href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}" data-target="#conversation-view" data-toggle="modal">点击查看</a></td>
                  <td>
                    <c:choose>
                      <c:when test="${conversation.status.notConfirmed}">
                        <a class="btn btn-success" style="color:#fff;" href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}/confirm" data-target="#conversation-confirm" data-toggle="modal">确认</a>
                        <a class="btn btn-success" style="color:#fff;" href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}/send-back" data-target="#conversation-confirm" data-toggle="modal">退回</a>
                      </c:when>
                      <c:otherwise>-</c:otherwise>
                    </c:choose>
                  </td>
                </tr>
              </c:forEach>
            </tbody>
          </table>
        </div>

      </div>
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/coaching-progress-list.js" />
  <script type="text/javascript">
    require([ 'page/session/coaching-progress-list' ], function(page) {
      page.init();
    })
  </script>

</body>
</html>